<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>点击按钮添加文本框</title>
  <style>
    body {
      font-family: Arial, sans-serif;
    }

    button {
      padding: 8px 15px;
      background-color: #007BFF;
      color: white;
      border: none;
      cursor: pointer;
    }

    button:hover {
      background-color: #0056b3;
    }

    input {
      margin-bottom: 10px;
      padding: 8px;
    }
  </style>
</head>

<body>
  <button onclick="addTextBox()">添加文本框</button>
  <div id="textBoxContainer"></div>

  <script>
    function addTextBox() {
      const textBoxContainer = document.getElementById('textBoxContainer');
      const input = document.createElement('input');
      input.type = 'text';
      textBoxContainer.appendChild(input);
    }
  </script>
</body>

</html>